﻿Public Class ImageDisplayForm
    Private m_cds As Dictionary(Of String, String)
    Private m_imageProxy As ImageProxy
    Private Sub ImageDisplayForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        m_cds = New Dictionary(Of String, String)
        m_cds.Add("Ambient: Music for Airports", "http://images.amazon.com/images/P/B000003S2K.01.LZZZZZZZ.jpg")
        m_cds.Add("Buddha Bar", "http://images.amazon.com/images/P/B00009XBYK.01.LZZZZZZZ.jpg")
        m_cds.Add("Ima", "http://images.amazon.com/images/P/B000005IRM.01.LZZZZZZZ.jpg")
        m_cds.Add("Karma", "http://images.amazon.com/images/P/B000005DCB.01.LZZZZZZZ.gif")
        m_cds.Add("MCMXC A.D.", "http://images.amazon.com/images/P/B000002URV.01.LZZZZZZZ.jpg")
        m_cds.Add("Northern Exposure", "http://images.amazon.com/images/P/B000003SFN.01.LZZZZZZZ.jpg")
        m_cds.Add("Selected Ambient Works, Vol. 2", "http://images.amazon.com/images/P/B000002MNZ.01.LZZZZZZZ.jpg")

        cmbCDs.DataSource = m_cds.Keys.ToList

        m_imageProxy = New ImageProxy(pbxDisplay)
    End Sub

    Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoad.Click
        m_imageProxy.DisplayImageFromURL(m_cds.Item(cmbCDs.Text))
    End Sub
End Class
